<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet" />
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link th:href="@{/erp/assets/css/codemirror.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}" />
    <link rel="stylesheet" th:href="@{/erp/font/css/font-awesome.min.css}" />
    <link rel="stylesheet" th:href="@{/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <link th:href="@{/erp/Widget/icheck/icheck.css}" rel="stylesheet" type="text/css" />
		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
    <script th:src="@{/erp/js/jquery-1.9.1.min.js}"></script>
    <script th:src="@{/erp/assets/js/bootstrap.min.js}"> </script>
    <script th:src="@{/erp/assets/js/typeahead-bs2.min.js}"></script>
    <!-- page specific plugin scripts -->
    <script th:src="@{/erp/assets/js/jquery.dataTables.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.bootstrap.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.admin.js}"></script>
    <script th:src="@{/erp/assets/layer/layer.js}" type="text/javascript" ></script>
    <!--<script th:src="@{/erp/assets/laydate/laydate.js}" type="text/javascript"></script>-->
    <script type="text/javascript" th:src="@{/erp/Widget/zTree/js/jquery.ztree.all-3.5.min.js}"></script>
    <script th:src="@{/erp/js/lrtk.js}" type="text/javascript" ></script>
<title>企业信息</title>
</head>
<body>
<div class="margin clearfix">
    <div class="detailed_style clearfix">
        <em class=""></em>
        <div class="shop_logo"><img th:src="@{/erp/images/detailnoimg.png}"/></div>
        <ul class="shop_content clearfix" th:each="company:${allrelation}">
            <li class="shop_name"><label class="label_name">企业名称：</label>
                <span class="info"  th:text="${company.company.companyName}"></span>
                <div class="Authenticate"><i class="icon-yxrz"></i><i class="icon-yhk"></i><i class="icon-sjrz"></i><i class="icon-grxx"></i></div>
            </li>

            <li><label class="label_name">企业类型：</label><span class="info" th:text="${company.company.companyType}"></span></li>

            <li><label class="label_name">经营范围：</label><span class="info" th:text="${company.company.businessScope}"></span></li>

            <li><label class="label_name">成立日期：</label><span class="info" th:text="${company.company.creatTime}"></span>
            </li>
            <li><label class="label_name">状&nbsp;&nbsp;&nbsp;&nbsp;态： </label>&nbsp;&nbsp;<span class="label label-success radius" th:text="${company.company.companyStatus}=='on'?'已认证':'待认证'"></span></li>

            <li><label class="label_name">申请人姓名：</label><span class="info" th:text="${company.company.legal}"></span>
            </li>
            <li><label class="label_name">申请时间：</label><span class="info" th:text="${company.company.creatTime}"></span>
            </li>
            <li><label class="label_name">电子邮箱：</label><span class="info" th:text="${company.company.companyEmail}"></span>
            </li>
            <li><label class="label_name">固定电话：</label><span class="info" th:text="${company.company.fixedTel}"></span>
            </li>
            </ul>
 </div>

  <div class="Store_Introduction">
  <div class="title_name">企业简介</div>
   <div class="info">
   <br />
    <!--   <span id="b"></span>
       <div id="a" style="display: none" th:text="${company.company.companyIntroduction}"/>-->
   </div>
 </div>
 </div>

<div class=" page-content clearfix">
 <div id="products_style">

     <div class="border clearfix">
       <button onclick="history.go(-1)" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回上一步&nbsp;&nbsp;</button>
        <a  th:href="@{/customer/detail3customer}+'?tParComB='+${companyId}+'&customerId='+${companyId}"  title="申请合作" class="btn btn-warning Order_form"><i class="icon-plus"></i>申请合作</a>

     </div>
     <!--产品列表展示-->
     <div class="h_products_list clearfix" id="products_list">
         <div id="scrollsidebar" class="left_Treeview">
             <div class="show_btn" id="rightArrow"><span></span></div>
             <div class="widget-box side_content">
                 <div class="side_title"><a title="隐藏" class="close_btn"><span></span></a></div>
                 <div class="side_list">
                     <div class="widget-header header-color-green2"><h4 class="lighter smaller">企业产品列表</h4></div>
                     <div class="widget-body">
                         <div class="widget-main padding-8">
                             <div id="treeDemo" class="ztree"></div>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
         <form hidden="hidden" class="product_form">
             <input name="companyId" th:value="${companyId}">
             <input name="nodeId" value="" id="nodeId">
         </form>
         <div class="table_menu_list" id="testIframe">
             <table class="table table-striped table-bordered table-hover" id="sample-table">
                 <thead>
                 <tr>
                     <th width="60px">序号</th>
                     <th width="60px">产品编号</th>
                     <th width="250px">产品名称</th>
                     <th width="100px">价格（元）</th>
                     <th width="180px">生产时间</th>
                     <th width="80px">审核状态</th>
                 </tr>
                 </thead>
                 <tbody>
                 </tbody>
             </table>
         </div>
     </div>
 </div>
    <div class="At_button">
        <button onclick="history.go(-1)" class="btn btn-default radius" type="button">返回上一步</button>
    </div>
</div>
</body>
</html>
<script>

    $(function () {
        $('#b').empty().append($('#a').text());
    })
    $(function () {
        $("#products_style").fix({
            float: 'left',
            //minStatue : true,
            skin: 'green',
            durationTime: false,
            spacingw: 30,//设置隐藏时的距离
            spacingh: 260,//设置显示时间距
        });
    });
</script>
<script type="text/javascript">
    //初始化宽度、高度
    $(".widget-box").height($(window).height() - 215);
    $(".table_menu_list").width($(window).width() - 260);
    $(".table_menu_list").height($(window).height() - 215);
    //当文档窗口发生改变时 触发
    $(window).resize(function () {
        $(".widget-box").height($(window).height() - 215);
        $(".table_menu_list").width($(window).width() - 260);
        $(".table_menu_list").height($(window).height() - 215);
    })

    $(function(){
        $('#nodeId').val('');
        //商品列表
        var table = $('#sample-table').dataTable({
            "autoWidth": false,
            searching : false,  //取消本地搜索框
            serverSide: true,   //开始服务器分页
            aoColumnDefs: [
                {"orderable": false, "aTargets": [1, 2,3,  4, 5]}// 制定列不参与排序
            ],
            //pageLength:5,
            ajax: {
                url : '/customer/productPage',
                type : 'post',
                data : function (d) {
                    var data = $('form').serialize();   //获取查询条件

                    //获取分页信息
                    var searchParams= {
                        start : d.start,
                        length : d.length
                    };
                    data = data + '&' + $.param(searchParams);
                    return data;
                }
            },
            columns : [
                { "data":"product.pnumber","createdCell": function (td,cellData,rowData,row,col) {
                        $(td).empty().append(row+1);
                    } },
                { "data": "product.pnumber" },
                { "data": "product.pname" },
                { "data": "product.pprice" },
                {"data": "order", "createdCell": function (td, cellData, rowData, row, col) {
                        if (cellData == null) {
                            $(td).empty().append('<span></span>');
                        } else{
                            $(td).empty().append('<span>'+rowData.order.productTime+'</span>');
                        }
                    }
                },
                {"data": "product.astatus", "createdCell": function (td, cellData, rowData, row, col) {
                        if(cellData=="1"){
                            $(td).empty().append('<span class="label label-success radius">已通过</span>');
                        }else if(cellData=="-1"){
                            $(td).empty().append('<span class="label label-defaunt radius">未通过</span>');
                        }
                    }
                }
            ]
        })

        /*******树状图*******/
        var setting = {
            async:{
                enable: true,
                url:'/categories/getCategories',
                autoParam : [ "id","pid","name"],
                otherParam : {"companyId" : "[[${companyId}]]"}
            },
            view: {
                showLine: false,
            },
            data: {
                simpleData: {
                    enable: true,
                    idKey: "id",
                    pIdKey: "pid",
                    rootPId: ""
                }
            },
            callback: {
                onClick : function (treeId, treeNode, d) {
                    $('#nodeId').val(d.id);
                    table.fnUpdate();
                }
            }
        };
        $.fn.zTree.init($("#treeDemo"), setting);
        var zTree = $.fn.zTree.getZTreeObj("tree");

    });
</script>
